package com.linq.cool.common.security.annotation;

import com.linq.cool.common.security.config.ApplicationConfig;
import com.linq.cool.common.security.feign.FeignAutoConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;

import java.lang.annotation.*;

/**
 * @Author: yqlin
 * @Date: 2020/12/29 16:03
 * @Description: 配置注解
 * @Version: 1.0.0
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@EnableAspectJAutoProxy(exposeProxy = true)
@MapperScan("com.linq.cool.**.mapper")
@EnableAsync
@Import({ApplicationConfig.class, FeignAutoConfiguration.class})
public @interface EnableCustomConfig {
    /*
     * 表示通过aop框架暴露该代理对象,AopContext能够访问
     * @EnableAspectJAutoProxy(exposeProxy = true)
     * 指定要扫描的Mapper类的包的路径
     * @MapperScan("com.linq.cool.**.mapper")
     *  开启线程异步执行
     * @EnableAsync
     *  自动加载类
     * @Import({AppConfig.class, FeignAutoConfiguration.class})
     */
}
